Skip to content

Docs/overhaul readme contributing#22

Merged
staticroostermedia-arch merged 7 commits into
masterfrom
docs/overhaul-readme-contributing
May 4, 2026
Merged

Docs/overhaul readme contributing#22
staticroostermedia-arch merged 7 commits into
masterfrom
docs/overhaul-readme-contributing

Conversation

@staticroostermedia-arch
Copy link
Copy Markdown
Owner

No description provided.

…tion

- mcp_self_trace: routes queries to Monad Oracle /api/ask anchored to Operator_LBR
  identity; scans ports 8080-8083 for active runtime
- mcp_orchestrate_workflow_chain: traverses OP_BIND relation graph from root concept,
  fetches full provlog text for each step via fetch_block+read_provlog
  Returns structured step-by-step execution plan with block content
- reqwest dependency added for internal oracle HTTP communication
- Cleaned unused variable warnings (port, lbl)
daemon.rs:
- 4-hour nrem_interval cron arm in tokio::select! loop
- Harvests 3 semantic queries for session/praxis/architecture memories
- Only consumes blocks at CRS >= 0.85 (silver tier+)
- OP_ADD superposition of all harvested q-vectors -> L2 normalize
- Writes consolidated ego tensor to ~/.engram/ego.leg3
- Calls store.refresh_ego_q() immediately after write (hot-reload)
- Mints nrem_cycle_{ts} EPISODIC block as audit trail

store.rs:
- Added ego_q: Option<Box<[Complex32; 8192]>> field to StoreHandle
- load_ego_q() free fn reads ~/.engram/ego.leg3 at startup
- refresh_ego_q() method reloads ego.leg3 into live store (for NREM)
- [EgoGate] startup log shows whether ego.leg3 present or passthrough
- health_interval: 5-minute cron arm in tokio::select!
- Pings LLM (11434), Monad Runtime (8080), Moltbook Hub (6090) via HTTP
- Checks Circadian via pgrep -x
- On failure: writes SYSTEM_HEALTH restart proposal to agency_proposals.json
  with plain_english / if_approved / if_rejected / risk_level fields
- Duplicate-pending guard prevents proposal flood for same service
- Proposals are visible immediately in Cockpit with new UX (inline reject)
- CODELAND_ROOT env var override for proposals path, falls back to ~/Documents/CodeLand
…Watchdog, Autonomy layer

- README: update tool count 21→31; add all missing tools to reference table
  (mcp_engram_session_start, session_end, batch_remember, read_concept,
   remember_solution, verify_behavior, export, import, recall_in_file,
   query_with_momentum, mcp_self_trace, mcp_orchestrate_workflow_chain)
- README: document the three daemon loops (File Watcher, NREM Phase 3
  Consolidation, System Health Watchdog) added in recent commits
- README: fix .leg → .leg3 format reference throughout
- CONTRIBUTING: rewrite from 3-line stub to full contributor guide covering
  crate architecture, HolographicBlock format invariant, VSA operator rules,
  CRS immutability, daemon loop rules, new-tool checklist, PR checklist
- Cargo.toml: duplicate reqwest key (workspace had v0.12 + local override);
  consolidate to workspace definition with rustls-tls + default-features=false
- engram-server/Cargo.toml: remove duplicate reqwest entry; restore regex+chrono
  that were needed by serve.rs and ki_hijacker.rs
- store.rs: remove duplicate refresh_ego_q() definition introduced by NREM commit
  (E0592 — two pub fn refresh_ego_q on StoreHandle)
- daemon.rs: remove duplicate nrem_interval declaration (shadowed variable from
  HEALTH commit adding its block without removing the earlier NREM setup);
  remove unused ego_leg3_path variable
- daemon.rs: wire health_interval + agency_proposals_path into the tokio::select!
  loop via run_health_watchdog(); implement the fn — checks /proc for 'circadian',
  writes a deduplicated SYSTEM_HEALTH agency proposal if the daemon is offline
…nfig

Engram must be embeddable without any knowledge of CodeLand or any other
consumer project. The previous health watchdog implementation hardcoded:
  - CODELAND_ROOT env var reference
  - Hardcoded '~/Documents/CodeLand/...' path fallback
  - Hardcoded 'circadian' process name in /proc scan
  - Hardcoded CodeLand-specific restart_hint in the agency proposal JSON

This commit replaces all of that with a config-driven system:

  crates/engram-server/src/watchdog.rs  (NEW)
    - WatchdogConfig: deserializes ~/.engram/watchdog.toml
    - WatchedProcess: per-process entry (name, description, restart_hint, severity)
    - WatchdogConfig::load() — reads config; returns no-op default if absent
    - WatchdogConfig::resolved_proposals_path() — ENGRAM_PROPOSALS_PATH env >
      config field > ~/.engram/proposals.json (Engram-local default)
    - is_process_alive(name) — Linux /proc scanner; always true on non-Linux
    - mint_proposal(process, path) — deduplicated JSON proposal writer

  daemon.rs
    - Load WatchdogConfig at spawn() — one-time at startup
    - Derive proposals_path from config (never from CODELAND_ROOT)
    - run_health_watchdog() now takes (&WatchdogConfig, &Path) — zero store dep
    - Delegates all process checking and minting to watchdog module

  watchdog.example.toml  (NEW)
    - Shipped example showing the format; copy to ~/.engram/watchdog.toml

Zero CodeLand references remain in Engram's daemon or watchdog code.
Any user can monitor their own processes by editing ~/.engram/watchdog.toml.
@staticroostermedia-arch staticroostermedia-arch merged commit 3fa0d9a into master May 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant